package com.imooc.config;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 未登录处理器
 * @author 顾志杰
 * @date 2020/10/13-17:43
 */
@RestController
public class SecurityController {

    @GetMapping("/login")
    @ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR)
    public String requireAuthentication(HttpServletRequest request,
                                        HttpServletResponse response) {
        return "用户未登录";
    }
}
